package table.model.rowModel;



public class Row implements Comparable {

	private int modelIndex;
	private SortedRowModel rowModel;
	
	public Row(int modelIndex) {
		this.modelIndex = modelIndex;
	}
	
	public int getModelIndex() {
		return modelIndex;
	}
	
	public int compareTo(Object o) {
        int row1 = modelIndex;
        int row2 = ((Row) o).modelIndex;

        return rowModel.sortRowValuesAt(row1,row2);
	}

	public void setRowModel(SortedRowModel rowModel) {
		this.rowModel = rowModel;
	}
}
